<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // 数据类型转换，计算年龄，在网页弹出一个输入框，输入年龄后，得出计算结果
        var year = prompt('请输入你的出生年份');
        var age = 2024 - year;
        alert('你的年龄为' + age + '岁 ' + ' your age is ' + age);
    </script>
</head>

<body>

</body>

</html>